package com.esint.validation.validators;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @description: 自定义校验器类
 * @author: 谷明
 * @createDate: 2021/8/13 1:44
 */
public class EngineModuleTypeValidator implements ConstraintValidator<EngineModuleTypeRule, String> {
    @Override
    public boolean isValid(String sValue, ConstraintValidatorContext constraintValidatorContext) {
        // 规定，引擎型号必须用VVV开头
        return sValue.startsWith("VVV");
    }
}
